<?php

	class Devmod_method_castField_date extends Devmod_castField_abstraction {
	
		public function type_edit()
		{
			$this->view->assign(array(
				'value' => $this->value,
				'field_name' => $this->cfg['field_name'],
				'type' => 'edit'
			));
			
			return $this->view->fetch('common/cast_date.tpl');
		}
		
		public function type_add()
		{
			$this->view->assign(array(
				'value' => mktime(),
				'field_name' => $this->cfg['field_name'],
				'type' => 'add'
			));
			
			return $this->view->fetch('common/cast_date.tpl');
		}
		
		public function type_frontend_add()
		{
			return $this->type_add();
		}
		
	}